package com.zjs.springboot.ConfigurationPropertiesUsage;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 测试查看从配置文件获取的信息
 * @Author zhu_jinsheng[zhu_js@suixingpay.com]
 * @Date 2019/12/27 14:16
 * @Version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/configuration/properties")
public class TestController {
    @Autowired
    private MyTestConfigurationProperties properties;
    @PostMapping("/test")
    public String test(){
        log.info(properties.getUser().toString());
        log.info(properties.getCompany().toString());
        return "访问成功";
    }
}
